package main

import (
	"github.com/gin-gonic/gin"
	"order/api"
	"order/appconfig"
	"order/inits/model"
)

func main() {
	appconfig.Init()
	model.MysqlInit()
	router := gin.Default()
	//用户
	api.Register(router)
	api.Login(router)
	//商品
	api.CreatePro(router)
	api.FindPro(router)
	api.UpdatePro(router)
	api.DelPro(router)
	//评论
	api.CreateCom(router)
	api.FindCom(router)
	api.UpdateCom(router)
	api.DelCom(router)
	//订单
	api.CreateOrder(router)
	api.FindOrder(router)
	api.UpdateOrder(router)
	api.DelOrder(router)
	router.Run() // 监听并在 0.0.0.0:8080 上启动服务
}
